﻿using UnityEngine;
using System.Collections;
using Dict.DataModel;

namespace Room
{
    public class RCLODUnionNpc : RCLODBase
    {
        TableUnionFightNpc dictData;
        string modelRes;
        string weaponId;
        public RCLODUnionNpc(RoomCharactor owner):base(owner)
        {
            type = LODType.UnionNpc;
        }
        
        public void Init(TableUnionFightNpc npc)
        {
            this.modelRes = npc.ModelRes;
            this.weaponId = npc.WeaponId;
            dictData = npc;


        }

        public override void DoResume()
        {
            LoadModel(modelRes);
        }

        public override float GetHeight()
        {
            return (float)dictData.Height;
        }

        protected override void OnLoadModelComplete()
        {
            base.OnLoadModelComplete();
            Model.SetActive(true);
            model.GetComponent<ModelRenderKit>().ShowSimpleShadow(simpleShadowTex);
            CommonMethod.ChangeLayer(Model.transform, LayerName.SceneActor);
            owner.PlayAnim(AniName.STAND);
        }

    }
}